import type { RouteComponent, RouteMeta, LocationQuery } from 'vue-router'

/**登录参数 */
export interface ILoginParams {
  account: string // 用户名
  password: string // 密码
}

/** 部门类型 */
export type DepartmentListType = {
  departmentName: string
  departmentCode: string
}

/**角色类型 */
export type RoleTypeListType = {
  code: string
  name: string
  type: string
  key: string
  url: string
}

/** 用户信息 */
export type UserInfoType = {
  id?: string
  account?: string
  name?: string
  phone?: string
  organizationCode?: string
  organizationName?: string
  organizationLogo?: string
  websiteIcon?: string
  systemName?: string
  departmentList?: Array<DepartmentListType>
  roleTypeList?: Array<RoleTypeListType>
  relationWrehouse?: string
  relationPark?: string
  relationCargoowner?: string
}

/** 仓库类型 */
export interface IWareHouse {
  warehouseCode: string
  warehouseId: string
  warehouseName: string
  name?: string
  code?: string
  id?: string
  nameAdCode?: string
}

/** 用户对应仓库、园区类型 */
export interface IUserWareHouseInfo {
  organizationName: string
  userParkList: any[]
  userWarehouseList: IWareHouse[]
}

/** 路由类型 */
export interface IRouterType {
  copyOriginRouter?: any
  code?: string
  name?: string
  type?: string
  icon?: string
  sort?: number
  parentCode?: string
  routeUrl?: string
  key?: string
  isChildren?: boolean
  isDisplay?: boolean
  menuState?: string
  datafieldPermissionsCount?: string
  children: Array<IRouterType>
  path: string
  redirect?: string
  component?: RouteComponent
  meta?: RouteMeta | any
  query?: LocationQuery
}
